﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using DapperExtensions.Mapper;
namespace LS.Entitys
{
    /// <summary>
    /// 组织结构管理
    /// </summary>
    [Table("sys_organize")]
    public class SysOrganizeEntity:EntityBaseDateDel
    {
        /// <summary>
        /// 组织代码
        /// </summary>
        public string OrgCode { get; set; }

        /// <summary>
        /// 组织名称
        /// </summary>
        public string OrgName { get; set; }

        /// <summary>
        /// 注册公司名称
        /// </summary>
        public string OrgCompanyName { get; set; }

        /// <summary>
        /// 法人代表
        /// </summary>
        public string Corporate { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string Telephone { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        public string Contact { get; set; }

        /// <summary>
        /// 注册地址
        /// </summary>
        public string Addr { get; set; }

        /// <summary>
        /// 父级Id
        /// </summary>
        public long ParentId { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int? OrgSeq { get; set; }
       
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 省份代码
        /// </summary>
        public string ProvinceCode { get; set; }
        /// <summary>
        /// 城市代码
        /// </summary>
        public string CityCode { get; set; }
        /// <summary>
        /// 区县代码
        /// </summary>
        public string CountyCode { get; set; }

        /// <summary>
        /// 省份
        /// </summary>
        public string Province { get; set; }
        /// <summary>
        /// 市级
        /// </summary>
        public string City { get; set; }
        /// <summary>
        /// 区县
        /// </summary>
        public string County { get; set; }

        /// <summary>
        /// 附件
        /// </summary>
        public string FileIDs { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string Telephone1 { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        public string Contact1 { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string Telephone2 { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        public string Contact2 { get; set; }

        /// <summary>
        /// 成员数量
        /// </summary>
        public int? Members { get; set; }

        /// <summary>
        /// 附件
        /// </summary>
        public List<Hashtable> FileList { get; set; }

        /// <summary>
        /// 是否启用 1=是 0=否
        /// </summary>
        public bool? Isenable { get; set; }

    }
    public class SysOrganizeEntityMapper : ClassMapper<SysOrganizeEntity>
    {
        public SysOrganizeEntityMapper()
        {
            Table("sys_organize");
            Map(m => m.Members).Ignore();
            Map(m=>m.FileList).Ignore();
            AutoMap();
        }
    }

}
